package com.csx.governance.traffic.mq.rocketmq.model;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

/**
 * @author cuisongxu
 * @date 2023/3/5 14:45
 */
@Getter
@Setter
public class RocketMqServiceRule {

    private String serviceName;

    private String tag;

    /**
     * 是否开启该应用的全链路消息灰度,默认为 true
     */
    private Boolean enabled;

    public Boolean isEnabled() {
        if(Objects.isNull(enabled)) {
            return true;
        }
        return enabled;
    }
}
